package com.cookie.servlet;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.Arrays;
import java.util.List;

@WebServlet("/cookieSuccess")
public class CookieSuccessServlet extends HttpServlet {
    @Override
    protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        //调用DAO查询收件箱中所有的邮件
        List<String> list = Arrays.asList("work", "work1", "work2");
        req.setAttribute("emails",list);
        req.getRequestDispatcher("/WEB-INF/inBox.jsp").forward(req,resp);
    }
}
